package service.impl;

import java.util.List;
import java.util.Map;

import dao.OrderFoodDao;
import dao.impl.OrderFoodDaoImpl;
import entiey.OrderFood;
import service.OrderFoodService;

public class OrderFoodServiceImpl implements OrderFoodService{
	private OrderFoodDao ofd=new OrderFoodDaoImpl();
	@Override
	public boolean add(OrderFood food) {
		return ofd.add(food)>0;
	}

	@Override
	public boolean delete(int no) {
		return ofd.delete(no)>0;
	}

	@Override
	public boolean update(OrderFood food) {
		return ofd.update(food)>0;
	}

	@Override
	public List<OrderFood> findAll() {
		return ofd.findAll();
	}

	@Override
	public OrderFood findById(int id) {
		return ofd.findById(id);
	}

	@Override
	public Map<String, Integer> getOrderCount() {
		return ofd.getOrderCount();
	}

	@Override
	public List<OrderFood>findByOrderNo(String orderNo) {
		return ofd.findByOrderNo(orderNo);
	}
	@Override
	public boolean deleteByOrderNo(String orderNo) {
		return ofd.deleteByOrderNo(orderNo)>0;
	}
	

}
